/**
 * 
 */
package com.ofek.eventos.net.lks.test;

import java.io.Serializable;
import java.util.Objects;

import com.ofek.base.db.DataField;

/**
 * @author Ofek
 *
 */
public class EventID implements Serializable {
	@DataField
	public long id;
	@DataField
	public String owner;
	public EventID(final long id, final String owner) {
		this.id = id;
		this.owner = owner;
	}
	@Override
	public boolean equals(final Object obj) {
		if ( obj instanceof EventID ) return owner.equals(((EventID) obj).owner) && id==((EventID) obj).id;
		return false;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		return Objects.hash(id,owner);
	}
	/**
	 * 
	 */
	public EventID() {
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "["+owner+","+id+"]";
	}
}
